:: (html_element -> [html_element]) -> ([html_element] -> [html_element]) -package:List package:base

Map a function returning a list over a list and concatenate the results. concatMap can be seen as the composition of concat and map.
concatMap f xs == (concat . map f) xs
>>> concatMap (\i -> [-i,i]) []
[]

>>> concatMap (\i -> [-i,i]) [1,2,3]
[-1,1,-2,2,-3,3]
Map a function over all the elements of a container and concatenate the resulting lists.

Examples

Basic usage:
>>> concatMap (take 3) [[1..], [10..], [100..], [1000..]]
[1,2,3,10,11,12,100,101,102,1000,1001,1002]
>>> concatMap (take 3) (Just [1..])
[1,2,3]
Same as >>=, but with the arguments interchanged.